class Line extends egret.Shape {
    public x1: number
    public y1: number
    public x2: number
    public y2: number
    public lineWidth: number = 1

    public constructor(x1:number, y1:number, x2:number, y2:number) {
        super()
        this.x1 = x1
        this.y1 = y1
        this.x2 = x2
        this.y2 = y2
        this.init()
    }

    private init() {
        this.graphics.lineStyle(this.lineWidth)
        this.graphics.moveTo(this.x1, this.y1)
        this.graphics.lineTo(this.x2, this.y2)
    }
}